Imports BusinessLayer
Imports EntityLayer
Imports System.Data

Partial Class VistaSolicitudPedido
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim intNumPedido As Integer
            intNumPedido = CInt(Request.QueryString("strCodigo"))

            Dim dt As DataTable
            dt = SolicitudPedidoBL.ListarxCodigo(intNumPedido).Tables(0)

            txtNumero.Text = dt.Rows(0)(0).ToString
            txtFecha.Text = dt.Rows(0)(1).ToString
            txtNumeroSolicitud.Text = dt.Rows(0)(5).ToString

            dgDatos.DataSource = SolicitudPedidoProductoBL.ListarxCodigo(intNumPedido).Tables(0)
            dgDatos.DataBind()

        End If
    End Sub

    Protected Sub btnCancelar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancelar.Click
        Response.Redirect("ListaSolicitudPedido.aspx")
    End Sub
End Class
